package  {
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	public class CubeXSetter extends EventDispatcher {
		
		private var _bannerWidth:Number = 0; 
		private var _cubeWidth:Number;
		private var _currentX:Number;
		private var _currentRotation:Number;
		private var _startingX:Number = 0;
		
		public function CubeXSetter(cubeWidth:Number, numberOfCubes:int) {
			
			_cubeWidth = cubeWidth;
			trace("xSetter cube width: " + _cubeWidth);
			_bannerWidth = cubeWidth * numberOfCubes;
			trace("xSetter banner width: " + _bannerWidth);
			_startingX -= (_bannerWidth / 2);
			trace("xSetter startingX: " + _startingX);
			this.dispatchEvent(new Event(Event.COMPLETE));
		}
		
		public function cubeX(i:int):Number {
			var x = _startingX + (_cubeWidth * i);
			return (x);
		}
		
		public function rotationX(i:int):Number {
			var rotationX = 10 * i;
			return rotationX;
		}
	}	
}